﻿using System;
using System.Windows;
using System.Windows.Interactivity;
using System.Windows.Controls;

namespace myLiveMesh.Behavior.WindowManager
{
    public class btCloseBehavior : Behavior<Button>
    {
        #region constructor

        public btCloseBehavior() {}

        #endregion

        #region init

        protected override void OnAttached()
        {
            base.OnAttached();
        }

        protected override void OnDetaching()
        {
            base.OnDetaching();
        }

        #endregion

        #region members

        public event RoutedEventHandler WindowClosed
        {
            add
            {
                this.AssociatedObject.Click += value;
            }
            remove
            {
                this.AssociatedObject.Click -= value;
            }
        }

        #endregion
    }
}
